/**
*	流程模块： 单据提醒设置的扩展js
*	开发者：雨中磐石
*	地址：www.rockoa.com
*	日期：2023-07-29
*/

//录入页使用
js.remind_input = function(){
	
	
	this.initbodys = function(){
		var me = this;
		$(this.form('rate')).change(function(){
			me.form('rateval').value = '';
		});
	}
	
	this.onchangedate = function(fid){
		if(fid=='rateval'){
			this.changedatess();
		}
	}

	this.changedatess= function(){
		var fid  = 'rateval';
		var rate = this.form('rate').value,jg = 11;
		var val  = this.form(fid).value;
		if(!val)return;
		//var val  = val.substr(0, val.length-2)+'00';
		
		
		if(rate=='o')jg=0;
		if(rate=='m')jg=8;
		if(rate=='y')jg=5;
		if(rate=='h' || rate=='b')jg=14;
		if(rate=='i')jg=17;
		if(val && val.indexOf('-')>0){
			this.form(fid).value= val.substr(jg);
		}
	}
}

js.remind_list = function(){
	
	
	this.initbodys = function(){
		this.optobj.addbtn('清空运行','clearrun', this);
		this.optobj.addhide();
	}
	
	this.clearrun = function(){
		var me = this;
		js.ajax.get({
			loading:'清空中...',
			url:this.getacturl('clearrun'),
			loadsuccess:'清空成功'
		},function(ret){
			me.table.reload();
		});
	}
}
